<?php
require_once 'nrg/string.ext.js';
?>

var Nrg_Uiw_Theme = new Class({
	
	Implements: [Options],
	
	options: {
		base_src: ''
	},
	
	//--------------------------------------------------------------------------
	//--------------------------------------------------------------------------
	
	initialize: function(options)
	{
		this.setOptions(options);
		this.options.base_src = this.options.base_src.cutFromEnd('/');
	},
	
	//--------------------------------------------------------------------------
	
	getIconSrc: function(name, size)
	{
		name = name.cutFromBoth('/');
		
		return
			this.options.base_src
			+ '/' + size + 'x' + size + '/'
			+ name + '.png';
	}
	
	//--------------------------------------------------------------------------
	
});

var UiwCrystalTheme = new Nrg_Uiw_Theme({
	base_src: '/nrg/themes/crystal'
});